package com.csy.user.entity;

import java.io.Serializable;
import java.sql.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 
 * @since 2025-02-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("park_space")
public class ParkSpace implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String spaceNum;
    /**
     * 业主id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long ownerId;

    @TableField(exist = false)
    private String ownerName;
    /**
     * 车牌号
     */
    private String carNumber;

    /**
     * 2有车1没车
     */
    private Integer hasCar;

    //车库
    private String garage;

    //1售出2租赁3未售出
    private Integer status;

    //起租日期
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date rentTime;

    //到期时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expireTime;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long communityId;


}
